package com.phs.main.web.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author Trent
 * @since 2020-07-07
 */
@Data
@EqualsAndHashCode
@ApiModel(value = "SysUsers对象", description = "用户表")
public class SysUsers implements Serializable {

	private static final long serialVersionUID = 1L;

	//	hidden 隐藏，不显示在swagger 文档中
	@ApiModelProperty(value = "用户表主码", hidden = true)
	@TableId(value = "user_ID", type = IdType.AUTO)
	private Long userId;

	//	required 必需字段
	@ApiModelProperty(value = "用户的姓名", required = true)
	private String userName;

	@ApiModelProperty(value = "用户登录密码", required = true)
	@TableField(value = "u_password")
	private String password;

	@ApiModelProperty(value = "用户的密码加密操作", hidden = true)
	private String salt;

	@ApiModelProperty(value = "用户的联系电话", required = true)
	private String tel;

	@ApiModelProperty(value = "用户的家庭住址")
	private String address;

	@ApiModelProperty(value = "用户的身份证号")
	private String idNum;

	@ApiModelProperty(value = "用户的年龄")
	private Integer age;

	@ApiModelProperty(value = "是否被锁定", hidden = true)
	//	逻辑删除，假装删除其实没删，1 是被删掉，这部分工作自动完成，前面照常删就好
	@TableLogic(value = "0", delval = "1")
	private Integer locked;


}
